package com.example.tianwu.daydayup;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class PhotoActivity extends Activity {

    private String fileName;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photo);

        Intent main = getIntent();
        fileName = main.getStringExtra("PhotoFile");

        ImageView photoShow = (ImageView)findViewById(R.id.photoPreview);
        Bitmap photo = BitmapFactory.decodeFile(fileName);
        photoShow.setImageBitmap(photo);

    }
    public void reTake(View view){
        setResult(RESULT_CANCELED);
        finish();
    }
    public void okPhoto(View view){
        setResult(RESULT_OK);
        finish();
    }
}
